<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>

<script>
//    $(function() {
//        $("#btnCancel").on('click', function () {
//            hideShowTableTd('contentTable', '0,1,2,3,4,5,6，7,8,9,10,11,12,13', '1');
//            $("#RightDiv").attr("style", "display: none");
//            $("#LeftDiv").attr("class", "main-content col-lg-12");
//            $("#LeftDiv").show('normal');
//        })

        <%--$("#btnSubmit").on('click',function(){--%>
            <%--formSaveLoad("rigthDoctorCenterDiv","inputForm","${ctx}/doctor/outpTreatRec/save","${ctx}/doctor/outpTreatRec/index?patientId="+$('#patientId').val()+"&clinicId="+$('#clinicId').val());--%>
            <%--document.getElementById("inputForm").reset();--%>
        <%--})--%>
//    })
</script>
<div class="content-wrap">

            <section class="panel panel-default">
                <div class="panel-body">
                    <div class="col-lg-12">
                        <form:form id="inputForm" data-parsley-validate="" modelAttribute="doctorTempla" onsubmit="return formSaveLoad('mainCenterDiv','inputForm','${ctx}/template/doctorTempla/save','${ctx}/template/doctorTempla/indexTreat?type=0');" method="post" class="form-horizontal">
                            <form:hidden path="id" value="${doctorTempla.id}"/>
                            <form:hidden path="projectType" value="0"/>
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">主题：</label>
                                    <div class="col-sm-8">
                                        <form:input path="title" value="${doctorTempla.title}" data-parsley-required="true" htmlEscape="false" class="form-control"  maxlength="64" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">副标题：</label>
                                    <div class="col-sm-8">
                                        <form:input path="subTitle" value="${doctorTempla.subTitle}"  htmlEscape="false" class="form-control"  maxlength="64" />
                                    </div>
                                </div>
                                <%--<div class="form-group">--%>
                                    <%--<label class="col-sm-4 control-label">科室：</label>--%>
                                    <%--<div class="col-sm-8">--%>
                                        <%--<form:input path="deptCode" htmlEscape="false" class="form-control"  maxlength="64" />--%>
                                    <%--</div>--%>
                                <%--</div>--%>
                                <%--<div class="form-group">--%>
                                    <%--<label class="col-sm-4 control-label">项目类别：</label>--%>
                                    <%--<div class="col-sm-8">--%>
                                        <%--<form:input path="itemClass" htmlEscape="false" class="form-control"  maxlength="1" />--%>
                                    <%--</div>--%>
                                <%--</div>--%>
                            <div class="form-group">
                                <label class="col-sm-4 control-label">开单科室：</label>
                                <div class="col-sm-8">
                                    <sys:treeselect selectedParent="true" id="deptCode" name="deptCode"
                                                    update="false" value="${doctorTempla.deptCode}"
                                                    labelName="${fns:getDeptName(doctorTempla.deptCode,'')}"
                                                    labelValue="${fns:getDeptName(doctorTempla.deptCode,'')}"
                                                    title="科室" url="/sys/orgDept/treeData"
                                                    extId="${orgDept.id}" cssClass="form-control" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label">适用范围：</label>
                                <div class="col-sm-8">
                                    <%--<form:input path="flag" htmlEscape="false" class="form-control"  maxlength="1" />--%>
                                    <form:select path="flag" value="${doctorTempla.flag}" itemLabel="label" itemValue="value" class="form-control" data-parsley-required="true">
                                        <form:option value="" label="请选择持模板适用范围"/>
                                        <form:option value="0" label="全部"/>
                                        <form:option value="1" label="本人"/>
                                        <form:option value="2" label="科室"/>
                                    </form:select>
                                </div>
                            </div>
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">诊断描述：</label>
                                    <div class="col-sm-8">
                                        <form:input path="advice" value="${doctorTempla.advice}" htmlEscape="false" class="form-control"  maxlength="200" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">建议：</label>
                                    <div class="col-sm-8">
                                        <form:input path="diagnosis" value="${doctorTempla.diagnosis}" htmlEscape="false" class="form-control"  maxlength="200" />
                                    </div>
                                </div>


                                <div class="form-group">
                                    <label class="col-sm-4 control-label">备忘录：</label>
                                    <div class="col-sm-8">
                                        <form:input path="memo" htmlEscape="false" value="${doctorTempla.name}" class="form-control"  maxlength="100" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-sm-offset-2 col-sm-10">
                                        <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存">&nbsp;
                                        <input id="btnCancel" class="btn" type="button" value="返 回" onclick="loadDiv('mainCenterDiv','${ctx}/template/doctorTempla/indexTreat?type=0')">
                                </div>
                            </div>
                        </form:form>
                    </div>
                </div>
            </section>
        </div>